package ar.com.tallerdos.smartdinner.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import ar.com.tallerdos.smartdinner.model.Product;

import com.j256.ormlite.support.ConnectionSource;

public class ProductDBHelper extends BaseDBHelper<Product> {

	public ProductDBHelper(Context context) {
		super(context, BaseDBHelper.DATABASE_NAME, null, BaseDBHelper.DATABASE_VERSION, Product.class);
	}

	/**
	 * This is called when the database is first created. Usually you should
	 * call createTable statements here to create the tables that will store
	 * your data.
	 */
	@Override
	public void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {
		super.onCreate(db, connectionSource);

		// here we try inserting data in the on-create as a test
		//RuntimeExceptionDao<Product, Long> productDao = getRuntimeExceptionDao();
				
		Log.i(ProductDBHelper.class.getName(), "created new entries in onCreate: ");
	}	
}